using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Backend.JYD.AModel.Models.Mapping
{
    public class BidStatMap : EntityTypeConfiguration<BidStat>
    {
        public BidStatMap()
        {
            // Primary Key
            this.HasKey(t => t.UserId);

            // Properties
            this.Property(t => t.UserId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("BidStat");
            this.Property(t => t.UserId).HasColumnName("UserId");
            this.Property(t => t.BiddingNum).HasColumnName("BiddingNum");
            this.Property(t => t.PayNum).HasColumnName("PayNum");
            this.Property(t => t.FinishNum).HasColumnName("FinishNum");
            this.Property(t => t.OverdueNum).HasColumnName("OverdueNum");
            this.Property(t => t.RepayNum).HasColumnName("RepayNum");
            this.Property(t => t.BiddingAmount).HasColumnName("BiddingAmount");
            this.Property(t => t.ComingInterest).HasColumnName("ComingInterest");
            this.Property(t => t.ComingCapital).HasColumnName("ComingCapital");
            this.Property(t => t.TotalCapital).HasColumnName("TotalCapital");
        }
    }
}
